﻿<UserControl x:Class="Zcu.PanelComposer.Views.UserControls.PanelCanvas"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style x:Key="RadioStyle" TargetType="{x:Type RadioButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
            <Setter Property="Height" Value="40" />
            <Setter Property="GroupName" Value="paint" />
            <Setter Property="Margin" Value="5, 0" />
        </Style>
    </UserControl.Resources>
    <DockPanel LastChildFill="True">
        <TabControl DockPanel.Dock="Top">
            <TabItem Header="Base">
                <WrapPanel Height="50">
                    <RadioButton Click="Block_Click" Name="Remove" Content="Remove" ToolTip="Delete blocks" Style="{StaticResource RadioStyle}" />
                    
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockWindowA" ToolTip="BlockWindowA" >
                        <Viewbox>
                            <Label Template="{StaticResource BlockWindowA}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockWindowA2" ToolTip="BlockWindowA2" >
                        <Viewbox>
                            <Label Template="{StaticResource BlockWindowA2}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockWindowB" ToolTip="BlockWindowB" >
                        <Viewbox>
                            <Label Template="{StaticResource BlockWindowB}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockWindowC" ToolTip="BlockWindowC" >
                        <Viewbox >
                            <Label Template="{StaticResource BlockWindowC}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockBalconyA" ToolTip="BlockBalconyA" >
                        <Viewbox >
                            <Label Template="{StaticResource BlockBalconyA}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockBalconyA2" ToolTip="BlockBalconyA2" >
                        <Viewbox>
                            <Label Template="{StaticResource BlockBalconyA2}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockBalconyC" ToolTip="BlockBalconyC" >
                        <Viewbox>
                            <Label Template="{StaticResource BlockBalconyC}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockDoorA" ToolTip="BlockDoorA" >
                        <Viewbox>
                            <Label Template="{StaticResource BlockDoorA}" />
                        </Viewbox>
                    </RadioButton>
                    <RadioButton Click="Block_Click" Style="{StaticResource RadioStyle}" Name="BlockWallA" ToolTip="BlockWallA" >
                        <Viewbox>
                            <Label Template="{StaticResource BlockWallA}" />
                        </Viewbox>
                    </RadioButton>
                </WrapPanel>
            </TabItem>
            <TabItem Header="Painting">
                <WrapPanel Height="50">
                    <RadioButton Click="Block_Click" Name="Ellipse" Content="Ellipse" Width="100"
                                 ToolTip="Draw ellipse" Style="{StaticResource RadioStyle}" />
                    <RadioButton Click="Block_Click" Name="Rectangle" Content="Rectangle" Width="100"
                                 ToolTip="Draw rectangle" Style="{StaticResource RadioStyle}" />
                    <!--<RadioButton Click="Block_Click" Name="Ellipse" Content="Ellipse" ToolTip="Draw ellipse" Style="{StaticResource RadioStyle}" />-->
                    <TextBlock Text="Brush: " VerticalAlignment="Center" Margin="5" />
                    <xctk:ColorPicker Name="BrushColor" Width="100" Height="30" />
                    <TextBlock Text="Fill: " VerticalAlignment="Center" Margin="5" />
                    <xctk:ColorPicker Name="FillColor" Width="100" Height="30" />
                </WrapPanel>
            </TabItem>
        </TabControl>

        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
            <Border BorderThickness="1" BorderBrush="Black" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Canvas x:Name="PolyCanvas" Background="Transparent" MouseDown="PolyCanvas_MouseDown" MouseMove="PolyCanvas_MouseMove"
                        MouseEnter="PolyCanvas_MouseEnter" MouseLeave="PolyCanvas_MouseLeave" MouseUp="PolyCanvas_MouseUp">
                </Canvas>
            </Border>
        </ScrollViewer>
    </DockPanel>
</UserControl>
